<template>
  <el-dialog
    :model-value="dialogVisible"
    :title="title"
    @close="handleClose"
    width="600"
  >
    <slot name="center"></slot>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="handleClose">取消</el-button>
        <el-button type="primary" @click="footerBtn"> 确定 </el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup>
defineProps({
  dialogVisible: {
    type: Boolean,
    default: false,
  },
  title: {
    type: String,
    default: '',
  },
});
const emit = defineEmits(['handleClick', 'handleClose']);
const footerBtn = () => {
  emit('handleClick');
};

const handleClose = () => {
  emit('handleClose', false);
};
</script>
<style lang="scss" scoped></style>
